<div id="nav_bar">
    <div id="login_area">
        <?php if(!isset($_SESSION['id'])): ?>
            <form action="<?php echo base_url(); ?>usuario/login" method="post">
                <label for="username">username:</label><input type="text" id="username" name="username" />
                <label for="password">password:</label><input type="password" id="password" name="password" /><input type="submit" id="login" name="login" value="" alt="login" title="Fazer login." />
            </form>
        <?php else: ?>
            <p><a href="<?php echo base_url(); ?>usuario" class="nome"><?php echo $_SESSION['nome']; ?></a><a href="<?php echo base_url(); ?>usuario/logout"><img class="img" src="<?php echo base_url(); ?>img/logout.png" alt="logout" title="logout"/></a></p>
        <?php endif; ?>
    </div>
    <ul>
        <li>
            <a class="menu" href="<?php echo base_url() ?>">Home</a>
        </li>
        <li>
            <a class="menu" href="<?php echo base_url() ?>pagina/sobre">Quem Somos</a>
        </li>
        <li>
            <a class="menu" href="<?php echo base_url() ?>pagina/contato">Contato</a>
        </li>
        <li>
            <a class="menu" href="<?php echo base_url() ?>pagina/mostrarIdeias">Idéias</a>
        </li> 
        <?php if(!logado()): ?>
            <li>
                <a class="menu" href="<?php echo base_url() ?>usuario/cadastrar">Cadastre-se</a>
            </li>
        <?php else: ?>
            <li>
                <a class="menu" href="<?php echo base_url() ?>usuario/">Painel do Usuário</a>
            </li>
        <?php endif; ?>
    </ul>
</div>